"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const taro_1 = require("@tarojs/taro");
const components_1 = require("@tarojs/components");
const prop_types_1 = require("prop-types");
const classnames_1 = require("classnames");
const XDivider_1 = require("../../components/XDivider");
require("./Content.scss");
class default_1 extends taro_1.Component {
    render() {
        const { data = {}, isList } = this.props;
        return (<components_1.View className={classnames_1.default('inner', { 'inner-vertical': data.status === 0, 'inner-horizontal': data.status === 1 })}>
                <components_1.View className={classnames_1.default('title', { 'h': data.status === 1 })}>
                    {isList
            ?
                data.banner.map(cell => (<components_1.View className='paragraph' key={cell.id}>
                                <components_1.Text className='text'>{cell.title}</components_1.Text>
                                
                            </components_1.View>))
            :
                <components_1.View className='paragraph'>
                            <components_1.Text className='text'>{data.banner[0].title}</components_1.Text>
                            
                        </components_1.View>}
                </components_1.View>
                <components_1.View className='brief'>
                    <components_1.View className='caption'>
                        {isList &&
            <components_1.Text className='icon'>{data.status === 1 ? '已参与' : '已结束'}</components_1.Text>}
                        {isList &&
            <XDivider_1.default />}
                        <components_1.Text className='text'>{data.status === 1 ? `${data.endTime} 自动开奖` : '参与人数满3000自动开奖'}</components_1.Text>
                    </components_1.View>
                    {isList && data.status === 1 && <components_1.Text className='text'>共1人参加</components_1.Text>}
                </components_1.View>
            </components_1.View>);
    }
}
default_1.propTypes = {
    data: prop_types_1.default.object,
    isList: prop_types_1.default.bool,
};
default_1.defaultProps = {
    data: {
        status: 0,
        endTime: ''
    },
    isList: true
};
exports.default = default_1;
//# sourceMappingURL=Content.jsx.map